/**
* Author: fulishang
* Create Time  : 2016年8月28日,下午11:51:12
* Modify Time :
* Desc  : 
*/
package com.sam.si.dc.init;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.sam.si.dc.handler.XmlHandler;
import com.sam.si.dc.metadata.Field;
import com.sam.si.dc.metadata.FileCatalog;

@Component
public class InitializeConfig {

	@Autowired
	private XmlHandler xmlHandler;

	Map<String, FileCatalog> fileCatalogs = new HashMap<>();
	Map<String, List<Field>> fields = new HashMap<>();
	
	public Map<String, FileCatalog> initFileCatalogs() throws Exception{
		return  this.xmlHandler.unMarshallFileCatalog();
	}
	
	public Map<String, List<Field>> initFields() throws Exception {
		return this.xmlHandler.unMarshallFields();
	}
}
